import md5 from 'js-md5'
export default {
    makeSign(data, key) {
        let keys = Object.keys(data).sort(), obj = {}, str = "";
        for (let i = 0; i < keys.length; i++) {
            if (keys[i].toLowerCase() == 'sign') {
                continue
            }
            str += keys[i] + "=" + data[keys[i]] + '&'
        }

        return md5(str + 'key=' + key)
    }
}
